﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using RapChieuPhim.DTO;
using RapChieuPhim.DAO;
using System.Collections;
using System.Data;

namespace RapChieuPhim.BUS
{
    class CTRapBUS
    {
        public static CTRapDTO GetByID(int rap, int phim)
        {
            CTRapDAO ctrDAO = new CTRapDAO();
            return ctrDAO.GetByID(rap, phim);
        }

        public static IList GetAll()
        {
            CTRapDAO ctrDAO = new CTRapDAO();
            return ctrDAO.GetAll();
        }


        public static IList GetAllbyMaRap(int _MaRap)
        {
            CTRapDAO ctrDAO = new CTRapDAO();
            return ctrDAO.GetAllbyMaRap(_MaRap);
        }

        public static DataTable CheckCTRap(int _MaRap, int _MaPhim)
        {
            CTRapDAO ctrDAO = new CTRapDAO();
            return ctrDAO.CheckCTRap(_MaRap, _MaPhim);
        }

        public static void Insert(int _MaRap, int _MaPhim)
        {
            CTRapDAO ctrDAO = new CTRapDAO();
            ctrDAO.Insert(_MaRap, _MaPhim);
        }

        public static void Update(CTRapDTO CTRap)
        {
            CTRapDAO ctrDAO = new CTRapDAO();
            ctrDAO.Update(CTRap);
        }

        public static void Delete(int rap, int phim)
        {
            CTRapDAO ctrDAO = new CTRapDAO();
            ctrDAO.Delete(rap, phim);
        }
    }
}
